'''Module to detect netsplits and such.'''
############################################################################
#    Copyright (C) 2006 by Robert Small                                    #
#    SmallR2002@Gmail.com                                                  #
#                                                                          #
#    This program is free software; you can redistribute it and#or modify  #
#    it under the terms of the GNU General Public License as published by  #
#    the Free Software Foundation; either version 2 of the License, or     #
#    (at your option) any later version.                                   #
#                                                                          #
#    This program is distributed in the hope that it will be useful,       #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
#    GNU General Public License for more details.                          #
#                                                                          #
#    You should have received a copy of the GNU General Public License     #
#    along with this program; if not, write to the                         #
#    Free Software Foundation, Inc.,                                       #
#    59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             #
############################################################################

#TODO: Track netsplits.
#TODO: Work out a way to display this information.

import time

#<< AWAY :test
#>> :irc.hobo.v8d.org 306 SmallR2002 :You have been marked as being away
#<< PING LAG1219305476
#>> :irc.hobo.v8d.org PONG irc.hobo.v8d.org :LAG1219305476
#<< AWAY
#>> :irc.hobo.v8d.org 305 SmallR2002 :You are no longer marked as being away

class netsplit:
    '''
    Nesplit data.
    '''
    server1 = ""
    server2 = ""
    users = []
    def __init__(self, server1, server2):
        self.server1 = server1
        self.server2 = server2
        
        self.time = time.localtime()
    def add_user(self, user):
        '''
        Add a user to the list.
        @param user: new user
        @type user: string
        '''
        self.users.append(user)

#class highlight:
#    def __init__(self):
#        